namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0097 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.SysTaskHistoryNotification",
                c => new
                    {
                        TaskHistoryNotificationId = c.Int(nullable: false, identity: true),
                        EmpId = c.Int(),
                        TaskId = c.Int(),
                        Notified = c.Boolean(nullable: false),
                        Read = c.Boolean(nullable: false),
                    })
                .PrimaryKey(t => t.TaskHistoryNotificationId)
                .ForeignKey("dbo.hrm_ps_employees", t => t.EmpId)
                .ForeignKey("dbo.SysTask", t => t.TaskId)
                .Index(t => t.EmpId)
                .Index(t => t.TaskId);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.SysTaskHistoryNotification", new[] { "TaskId" });
            DropIndex("dbo.SysTaskHistoryNotification", new[] { "EmpId" });
            DropForeignKey("dbo.SysTaskHistoryNotification", "TaskId", "dbo.SysTask");
            DropForeignKey("dbo.SysTaskHistoryNotification", "EmpId", "dbo.hrm_ps_employees");
            DropTable("dbo.SysTaskHistoryNotification");
        }
    }
}
